
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="zh_Hans">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Django 3.2 release notes &#8212; Django 3.2.6.dev 文档</title>
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    <link rel="index" title="索引" href="../genindex.html" />
    <link rel="search" title="搜索" href="../search.html" />
    <link rel="next" title="Django 3.1.13 release notes" href="3.1.13.html" />
    <link rel="prev" title="Django 3.2.1 release notes" href="3.2.1.html" />



 
<script src="../templatebuiltins.js"></script>
<script>
(function($) {
    if (!django_template_builtins) {
       // templatebuiltins.js missing, do nothing.
       return;
    }
    $(document).ready(function() {
        // Hyperlink Django template tags and filters
        var base = "../ref/templates/builtins.html";
        if (base == "#") {
            // Special case for builtins.html itself
            base = "";
        }
        // Tags are keywords, class '.k'
        $("div.highlight\\-html\\+django span.k").each(function(i, elem) {
             var tagname = $(elem).text();
             if ($.inArray(tagname, django_template_builtins.ttags) != -1) {
                 var fragment = tagname.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + tagname + "</a>");
             }
        });
        // Filters are functions, class '.nf'
        $("div.highlight\\-html\\+django span.nf").each(function(i, elem) {
             var filtername = $(elem).text();
             if ($.inArray(filtername, django_template_builtins.tfilters) != -1) {
                 var fragment = filtername.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + filtername + "</a>");
             }
        });
    });
})(jQuery);</script>

  </head><body>

    <div class="document">
  <div id="custom-doc" class="yui-t6">
    <div id="hd">
      <h1><a href="../index.html">Django 3.2.6.dev 文档</a></h1>
      <div id="global-nav">
        <a title="Home page" href="../index.html">Home</a>  |
        <a title="Table of contents" href="../contents.html">Table of contents</a>  |
        <a title="Global index" href="../genindex.html">Index</a>  |
        <a title="Module index" href="../py-modindex.html">Modules</a>
      </div>
      <div class="nav">
    &laquo; <a href="3.2.1.html" title="Django 3.2.1 release notes">previous</a>
     |
    <a href="index.html" title="Release notes" accesskey="U">up</a>
   |
    <a href="3.1.13.html" title="Django 3.1.13 release notes">next</a> &raquo;</div>
    </div>

    <div id="bd">
      <div id="yui-main">
        <div class="yui-b">
          <div class="yui-g" id="releases-3.2">
            
  <div class="section" id="s-django-3-2-release-notes">
<span id="django-3-2-release-notes"></span><h1>Django 3.2 release notes<a class="headerlink" href="#django-3-2-release-notes" title="永久链接至标题">¶</a></h1>
<p><em>April 6, 2021</em></p>
<p>Welcome to Django 3.2!</p>
<p>These release notes cover the <a class="reference internal" href="#whats-new-3-2"><span class="std std-ref">new features</span></a>, as well as
some <a class="reference internal" href="#backwards-incompatible-3-2"><span class="std std-ref">backwards incompatible changes</span></a> you'll
want to be aware of when upgrading from Django 3.1 or earlier. We've
<a class="reference internal" href="#deprecated-features-3-2"><span class="std std-ref">begun the deprecation process for some features</span></a>.</p>
<p>See the <a class="reference internal" href="../howto/upgrade-version.html"><span class="doc">升级 Django 到最新的版本</span></a> guide if you're updating an existing
project.</p>
<p>Django 3.2 is designated as a <a class="reference internal" href="../internals/release-process.html#term-long-term-support-release"><span class="xref std std-term">long-term support release</span></a>. It will receive security updates for at least
three years after its release. Support for the previous LTS, Django 2.2, will
end in April 2022.</p>
<div class="section" id="s-python-compatibility">
<span id="python-compatibility"></span><h2>Python compatibility<a class="headerlink" href="#python-compatibility" title="永久链接至标题">¶</a></h2>
<p>Django 3.2 supports Python 3.6, 3.7, 3.8, and 3.9. We <strong>highly recommend</strong> and
only officially support the latest release of each series.</p>
</div>
<div class="section" id="s-what-s-new-in-django-3-2">
<span id="s-whats-new-3-2"></span><span id="what-s-new-in-django-3-2"></span><span id="whats-new-3-2"></span><h2>What's new in Django 3.2<a class="headerlink" href="#what-s-new-in-django-3-2" title="永久链接至标题">¶</a></h2>
<div class="section" id="s-automatic-appconfig-discovery">
<span id="automatic-appconfig-discovery"></span><h3>Automatic <a class="reference internal" href="../ref/applications.html#django.apps.AppConfig" title="django.apps.AppConfig"><code class="xref py py-class docutils literal notranslate"><span class="pre">AppConfig</span></code></a> discovery<a class="headerlink" href="#automatic-appconfig-discovery" title="永久链接至标题">¶</a></h3>
<p>Most pluggable applications define an <a class="reference internal" href="../ref/applications.html#django.apps.AppConfig" title="django.apps.AppConfig"><code class="xref py py-class docutils literal notranslate"><span class="pre">AppConfig</span></code></a> subclass
in an <code class="docutils literal notranslate"><span class="pre">apps.py</span></code> submodule. Many define a <code class="docutils literal notranslate"><span class="pre">default_app_config</span></code> variable
pointing to this class in their <code class="docutils literal notranslate"><span class="pre">__init__.py</span></code>.</p>
<p>When the <code class="docutils literal notranslate"><span class="pre">apps.py</span></code> submodule exists and defines a single
<a class="reference internal" href="../ref/applications.html#django.apps.AppConfig" title="django.apps.AppConfig"><code class="xref py py-class docutils literal notranslate"><span class="pre">AppConfig</span></code></a> subclass, Django now uses that configuration
automatically, so you can remove <code class="docutils literal notranslate"><span class="pre">default_app_config</span></code>.</p>
<p><code class="docutils literal notranslate"><span class="pre">default_app_config</span></code> made it possible to declare only the application's path
in <a class="reference internal" href="../ref/settings.html#std:setting-INSTALLED_APPS"><code class="xref std std-setting docutils literal notranslate"><span class="pre">INSTALLED_APPS</span></code></a> (e.g. <code class="docutils literal notranslate"><span class="pre">'django.contrib.admin'</span></code>) rather than the
app config's path (e.g. <code class="docutils literal notranslate"><span class="pre">'django.contrib.admin.apps.AdminConfig'</span></code>). It was
introduced for backwards-compatibility with the former style, with the intent
to switch the ecosystem to the latter, but the switch didn't happen.</p>
<p>With automatic <code class="docutils literal notranslate"><span class="pre">AppConfig</span></code> discovery, <code class="docutils literal notranslate"><span class="pre">default_app_config</span></code> is no longer
needed. As a consequence, it's deprecated.</p>
<p>See <a class="reference internal" href="../ref/applications.html#configuring-applications-ref"><span class="std std-ref">配置应用程序</span></a> for full details.</p>
</div>
<div class="section" id="s-customizing-type-of-auto-created-primary-keys">
<span id="customizing-type-of-auto-created-primary-keys"></span><h3>Customizing type of auto-created primary keys<a class="headerlink" href="#customizing-type-of-auto-created-primary-keys" title="永久链接至标题">¶</a></h3>
<p>When defining a model, if no field in a model is defined with
<a class="reference internal" href="../ref/models/fields.html#django.db.models.Field.primary_key" title="django.db.models.Field.primary_key"><code class="xref py py-attr docutils literal notranslate"><span class="pre">primary_key=True</span></code></a> an implicit
primary key is added. The type of this implicit primary key can now be
controlled via the <a class="reference internal" href="../ref/settings.html#std:setting-DEFAULT_AUTO_FIELD"><code class="xref std std-setting docutils literal notranslate"><span class="pre">DEFAULT_AUTO_FIELD</span></code></a> setting and
<a class="reference internal" href="../ref/applications.html#django.apps.AppConfig.default_auto_field" title="django.apps.AppConfig.default_auto_field"><code class="xref py py-attr docutils literal notranslate"><span class="pre">AppConfig.default_auto_field</span></code></a>
attribute. No more needing to override primary keys in all models.</p>
<p>Maintaining the historical behavior, the default value for
<a class="reference internal" href="../ref/settings.html#std:setting-DEFAULT_AUTO_FIELD"><code class="xref std std-setting docutils literal notranslate"><span class="pre">DEFAULT_AUTO_FIELD</span></code></a> is <a class="reference internal" href="../ref/models/fields.html#django.db.models.AutoField" title="django.db.models.AutoField"><code class="xref py py-class docutils literal notranslate"><span class="pre">AutoField</span></code></a>. Starting
with 3.2 new projects are generated with <a class="reference internal" href="../ref/settings.html#std:setting-DEFAULT_AUTO_FIELD"><code class="xref std std-setting docutils literal notranslate"><span class="pre">DEFAULT_AUTO_FIELD</span></code></a> set to
<a class="reference internal" href="../ref/models/fields.html#django.db.models.BigAutoField" title="django.db.models.BigAutoField"><code class="xref py py-class docutils literal notranslate"><span class="pre">BigAutoField</span></code></a>. Also, new apps are generated with
<a class="reference internal" href="../ref/applications.html#django.apps.AppConfig.default_auto_field" title="django.apps.AppConfig.default_auto_field"><code class="xref py py-attr docutils literal notranslate"><span class="pre">AppConfig.default_auto_field</span></code></a>
set to <a class="reference internal" href="../ref/models/fields.html#django.db.models.BigAutoField" title="django.db.models.BigAutoField"><code class="xref py py-class docutils literal notranslate"><span class="pre">BigAutoField</span></code></a>. In a future Django release the
default value of <a class="reference internal" href="../ref/settings.html#std:setting-DEFAULT_AUTO_FIELD"><code class="xref std std-setting docutils literal notranslate"><span class="pre">DEFAULT_AUTO_FIELD</span></code></a> will be changed to
<a class="reference internal" href="../ref/models/fields.html#django.db.models.BigAutoField" title="django.db.models.BigAutoField"><code class="xref py py-class docutils literal notranslate"><span class="pre">BigAutoField</span></code></a>.</p>
<p>To avoid unwanted migrations in the future, either explicitly set
<a class="reference internal" href="../ref/settings.html#std:setting-DEFAULT_AUTO_FIELD"><code class="xref std std-setting docutils literal notranslate"><span class="pre">DEFAULT_AUTO_FIELD</span></code></a> to <a class="reference internal" href="../ref/models/fields.html#django.db.models.AutoField" title="django.db.models.AutoField"><code class="xref py py-class docutils literal notranslate"><span class="pre">AutoField</span></code></a>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">DEFAULT_AUTO_FIELD</span> <span class="o">=</span> <span class="s1">&#39;django.db.models.AutoField&#39;</span>
</pre></div>
</div>
<p>or configure it on a per-app basis:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">django.apps</span> <span class="kn">import</span> <span class="n">AppConfig</span>

<span class="k">class</span> <span class="nc">MyAppConfig</span><span class="p">(</span><span class="n">AppConfig</span><span class="p">):</span>
    <span class="n">default_auto_field</span> <span class="o">=</span> <span class="s1">&#39;django.db.models.AutoField&#39;</span>
    <span class="n">name</span> <span class="o">=</span> <span class="s1">&#39;my_app&#39;</span>
</pre></div>
</div>
<p>or on a per-model basis:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">django.db</span> <span class="kn">import</span> <span class="n">models</span>

<span class="k">class</span> <span class="nc">MyModel</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
    <span class="nb">id</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">AutoField</span><span class="p">(</span><span class="n">primary_key</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
</pre></div>
</div>
<p>In anticipation of the changing default, a system check will provide a warning
if you do not have an explicit setting for <a class="reference internal" href="../ref/settings.html#std:setting-DEFAULT_AUTO_FIELD"><code class="xref std std-setting docutils literal notranslate"><span class="pre">DEFAULT_AUTO_FIELD</span></code></a>.</p>
<p>When changing the value of <a class="reference internal" href="../ref/settings.html#std:setting-DEFAULT_AUTO_FIELD"><code class="xref std std-setting docutils literal notranslate"><span class="pre">DEFAULT_AUTO_FIELD</span></code></a>, migrations for the
primary key of existing auto-created through tables cannot be generated
currently. See the <a class="reference internal" href="../ref/settings.html#std:setting-DEFAULT_AUTO_FIELD"><code class="xref std std-setting docutils literal notranslate"><span class="pre">DEFAULT_AUTO_FIELD</span></code></a> docs for details on migrating
such tables.</p>
</div>
<div class="section" id="s-functional-indexes">
<span id="s-new-functional-indexes"></span><span id="functional-indexes"></span><span id="new-functional-indexes"></span><h3>Functional indexes<a class="headerlink" href="#functional-indexes" title="永久链接至标题">¶</a></h3>
<p>The new <a class="reference internal" href="../ref/models/indexes.html#django.db.models.Index.expressions" title="django.db.models.Index.expressions"><code class="xref py py-attr docutils literal notranslate"><span class="pre">*expressions</span></code></a> positional
argument of <a class="reference internal" href="../ref/models/indexes.html#django.db.models.Index" title="django.db.models.Index"><code class="xref py py-class docutils literal notranslate"><span class="pre">Index()</span></code></a> enables creating
functional indexes on expressions and database functions. For example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">django.db</span> <span class="kn">import</span> <span class="n">models</span>
<span class="kn">from</span> <span class="nn">django.db.models</span> <span class="kn">import</span> <span class="n">F</span><span class="p">,</span> <span class="n">Index</span><span class="p">,</span> <span class="n">Value</span>
<span class="kn">from</span> <span class="nn">django.db.models.functions</span> <span class="kn">import</span> <span class="n">Lower</span><span class="p">,</span> <span class="n">Upper</span>


<span class="k">class</span> <span class="nc">MyModel</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
    <span class="n">first_name</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mi">255</span><span class="p">)</span>
    <span class="n">last_name</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mi">255</span><span class="p">)</span>
    <span class="n">height</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">IntegerField</span><span class="p">()</span>
    <span class="n">weight</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">IntegerField</span><span class="p">()</span>

    <span class="k">class</span> <span class="nc">Meta</span><span class="p">:</span>
        <span class="n">indexes</span> <span class="o">=</span> <span class="p">[</span>
            <span class="n">Index</span><span class="p">(</span>
                <span class="n">Lower</span><span class="p">(</span><span class="s1">&#39;first_name&#39;</span><span class="p">),</span>
                <span class="n">Upper</span><span class="p">(</span><span class="s1">&#39;last_name&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">desc</span><span class="p">(),</span>
                <span class="n">name</span><span class="o">=</span><span class="s1">&#39;first_last_name_idx&#39;</span><span class="p">,</span>
            <span class="p">),</span>
            <span class="n">Index</span><span class="p">(</span>
                <span class="n">F</span><span class="p">(</span><span class="s1">&#39;height&#39;</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="n">F</span><span class="p">(</span><span class="s1">&#39;weight&#39;</span><span class="p">)</span> <span class="o">+</span> <span class="n">Value</span><span class="p">(</span><span class="mi">5</span><span class="p">)),</span>
                <span class="n">name</span><span class="o">=</span><span class="s1">&#39;calc_idx&#39;</span><span class="p">,</span>
            <span class="p">),</span>
        <span class="p">]</span>
</pre></div>
</div>
<p>Functional indexes are added to models using the
<a class="reference internal" href="../ref/models/options.html#django.db.models.Options.indexes" title="django.db.models.Options.indexes"><code class="xref py py-attr docutils literal notranslate"><span class="pre">Meta.indexes</span></code></a> option.</p>
</div>
<div class="section" id="s-pymemcache-support">
<span id="pymemcache-support"></span><h3><code class="docutils literal notranslate"><span class="pre">pymemcache</span></code> support<a class="headerlink" href="#pymemcache-support" title="永久链接至标题">¶</a></h3>
<p>The new <code class="docutils literal notranslate"><span class="pre">django.core.cache.backends.memcached.PyMemcacheCache</span></code> cache backend
allows using the <a class="reference external" href="https://pypi.org/project/pymemcache/">pymemcache</a> library for memcached. <code class="docutils literal notranslate"><span class="pre">pymemcache</span></code> 3.4.0 or
higher is required. For more details, see the <a class="reference internal" href="../topics/cache.html"><span class="doc">documentation on caching in
Django</span></a>.</p>
</div>
<div class="section" id="s-new-decorators-for-the-admin-site">
<span id="new-decorators-for-the-admin-site"></span><h3>New decorators for the admin site<a class="headerlink" href="#new-decorators-for-the-admin-site" title="永久链接至标题">¶</a></h3>
<p>The new <a class="reference internal" href="../ref/contrib/admin/index.html#django.contrib.admin.display" title="django.contrib.admin.display"><code class="xref py py-func docutils literal notranslate"><span class="pre">display()</span></code></a> decorator allows for easily
adding options to custom display functions that can be used with
<a class="reference internal" href="../ref/contrib/admin/index.html#django.contrib.admin.ModelAdmin.list_display" title="django.contrib.admin.ModelAdmin.list_display"><code class="xref py py-attr docutils literal notranslate"><span class="pre">list_display</span></code></a> or
<a class="reference internal" href="../ref/contrib/admin/index.html#django.contrib.admin.ModelAdmin.readonly_fields" title="django.contrib.admin.ModelAdmin.readonly_fields"><code class="xref py py-attr docutils literal notranslate"><span class="pre">readonly_fields</span></code></a>.</p>
<p>Likewise, the new <a class="reference internal" href="../ref/contrib/admin/actions.html#django.contrib.admin.action" title="django.contrib.admin.action"><code class="xref py py-func docutils literal notranslate"><span class="pre">action()</span></code></a> decorator allows for
easily adding options to action functions that can be used with
<a class="reference internal" href="../ref/contrib/admin/index.html#django.contrib.admin.ModelAdmin.actions" title="django.contrib.admin.ModelAdmin.actions"><code class="xref py py-attr docutils literal notranslate"><span class="pre">actions</span></code></a>.</p>
<p>Using the <code class="docutils literal notranslate"><span class="pre">&#64;display</span></code> decorator has the advantage that it is now
possible to use the <code class="docutils literal notranslate"><span class="pre">&#64;property</span></code> decorator when needing to specify attributes
on the custom method. Prior to this it was necessary to use the <code class="docutils literal notranslate"><span class="pre">property()</span></code>
function instead after assigning the required attributes to the method.</p>
<p>Using decorators has the advantage that these options are more discoverable as
they can be suggested by completion utilities in code editors. They are merely
a convenience and still set the same attributes on the functions under the
hood.</p>
</div>
<div class="section" id="s-minor-features">
<span id="minor-features"></span><h3>Minor features<a class="headerlink" href="#minor-features" title="永久链接至标题">¶</a></h3>
<div class="section" id="s-django-contrib-admin">
<span id="django-contrib-admin"></span><h4><a class="reference internal" href="../ref/contrib/admin/index.html#module-django.contrib.admin" title="django.contrib.admin: Django's admin site."><code class="xref py py-mod docutils literal notranslate"><span class="pre">django.contrib.admin</span></code></a><a class="headerlink" href="#django-contrib-admin" title="永久链接至标题">¶</a></h4>
<ul>
<li><p class="first"><a class="reference internal" href="../ref/contrib/admin/index.html#django.contrib.admin.ModelAdmin.search_fields" title="django.contrib.admin.ModelAdmin.search_fields"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ModelAdmin.search_fields</span></code></a> now allows searching against quoted phrases
with spaces.</p>
</li>
<li><p class="first">Read-only related fields are now rendered as navigable links if target models
are registered in the admin.</p>
</li>
<li><p class="first">The admin now supports theming, and includes a dark theme that is enabled
according to browser settings. See <a class="reference internal" href="../ref/contrib/admin/index.html#admin-theming"><span class="std std-ref">主题化支持</span></a> for more details.</p>
</li>
<li><p class="first"><a class="reference internal" href="../ref/contrib/admin/index.html#django.contrib.admin.ModelAdmin.autocomplete_fields" title="django.contrib.admin.ModelAdmin.autocomplete_fields"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ModelAdmin.autocomplete_fields</span></code></a> now respects
<a class="reference internal" href="../ref/models/fields.html#django.db.models.ForeignKey.to_field" title="django.db.models.ForeignKey.to_field"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ForeignKey.to_field</span></code></a> and
<a class="reference internal" href="../ref/models/fields.html#django.db.models.ForeignKey.limit_choices_to" title="django.db.models.ForeignKey.limit_choices_to"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ForeignKey.limit_choices_to</span></code></a> when searching a related
model.</p>
</li>
<li><p class="first">The admin now installs a final catch-all view that redirects unauthenticated
users to the login page, regardless of whether the URL is otherwise valid.
This protects against a potential model enumeration privacy issue.</p>
<p>Although not recommended, you may set the new
<a class="reference internal" href="../ref/contrib/admin/index.html#django.contrib.admin.AdminSite.final_catch_all_view" title="django.contrib.admin.AdminSite.final_catch_all_view"><code class="xref py py-attr docutils literal notranslate"><span class="pre">AdminSite.final_catch_all_view</span></code></a> to <code class="docutils literal notranslate"><span class="pre">False</span></code> to disable the
catch-all view.</p>
</li>
</ul>
</div>
<div class="section" id="s-django-contrib-auth">
<span id="django-contrib-auth"></span><h4><a class="reference internal" href="../topics/auth/index.html#module-django.contrib.auth" title="django.contrib.auth: Django's authentication framework."><code class="xref py py-mod docutils literal notranslate"><span class="pre">django.contrib.auth</span></code></a><a class="headerlink" href="#django-contrib-auth" title="永久链接至标题">¶</a></h4>
<ul>
<li><p class="first">The default iteration count for the PBKDF2 password hasher is increased from
216,000 to 260,000.</p>
</li>
<li><p class="first">The default variant for the Argon2 password hasher is changed to Argon2id.
<code class="docutils literal notranslate"><span class="pre">memory_cost</span></code> and <code class="docutils literal notranslate"><span class="pre">parallelism</span></code> are increased to 102,400 and 8
respectively to match the <code class="docutils literal notranslate"><span class="pre">argon2-cffi</span></code> defaults.</p>
<p>Increasing the <code class="docutils literal notranslate"><span class="pre">memory_cost</span></code> pushes the required memory from 512 KB to 100
MB. This is still rather conservative but can lead to problems in memory
constrained environments. If this is the case, the existing hasher can be
subclassed to override the defaults.</p>
</li>
<li><p class="first">The default salt entropy for the Argon2, MD5, PBKDF2, SHA-1 password hashers
is increased from 71 to 128 bits.</p>
</li>
</ul>
</div>
<div class="section" id="s-django-contrib-contenttypes">
<span id="django-contrib-contenttypes"></span><h4><a class="reference internal" href="../ref/contrib/contenttypes.html#module-django.contrib.contenttypes" title="django.contrib.contenttypes: Provides generic interface to installed models."><code class="xref py py-mod docutils literal notranslate"><span class="pre">django.contrib.contenttypes</span></code></a><a class="headerlink" href="#django-contrib-contenttypes" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li>The new <code class="docutils literal notranslate"><span class="pre">absolute_max</span></code> argument for
<a class="reference internal" href="../ref/contrib/contenttypes.html#django.contrib.contenttypes.forms.generic_inlineformset_factory" title="django.contrib.contenttypes.forms.generic_inlineformset_factory"><code class="xref py py-func docutils literal notranslate"><span class="pre">generic_inlineformset_factory()</span></code></a>
allows customizing the maximum number of forms that can be instantiated when
supplying <code class="docutils literal notranslate"><span class="pre">POST</span></code> data. See <a class="reference internal" href="../topics/forms/formsets.html#formsets-absolute-max"><span class="std std-ref">Limiting the maximum number of instantiated forms</span></a> for more details.</li>
<li>The new <code class="docutils literal notranslate"><span class="pre">can_delete_extra</span></code> argument for
<a class="reference internal" href="../ref/contrib/contenttypes.html#django.contrib.contenttypes.forms.generic_inlineformset_factory" title="django.contrib.contenttypes.forms.generic_inlineformset_factory"><code class="xref py py-func docutils literal notranslate"><span class="pre">generic_inlineformset_factory()</span></code></a>
allows removal of the option to delete extra forms. See
<a class="reference internal" href="../topics/forms/formsets.html#django.forms.formsets.BaseFormSet.can_delete_extra" title="django.forms.formsets.BaseFormSet.can_delete_extra"><code class="xref py py-attr docutils literal notranslate"><span class="pre">can_delete_extra</span></code></a> for more information.</li>
</ul>
</div>
<div class="section" id="s-django-contrib-gis">
<span id="django-contrib-gis"></span><h4><a class="reference internal" href="../ref/contrib/gis/index.html#module-django.contrib.gis" title="django.contrib.gis: Geographic Information System (GIS) extensions for Django"><code class="xref py py-mod docutils literal notranslate"><span class="pre">django.contrib.gis</span></code></a><a class="headerlink" href="#django-contrib-gis" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li>The <a class="reference internal" href="../ref/contrib/gis/gdal.html#django.contrib.gis.gdal.GDALRaster.transform" title="django.contrib.gis.gdal.GDALRaster.transform"><code class="xref py py-meth docutils literal notranslate"><span class="pre">GDALRaster.transform()</span></code></a> method now supports
<a class="reference internal" href="../ref/contrib/gis/gdal.html#django.contrib.gis.gdal.SpatialReference" title="django.contrib.gis.gdal.SpatialReference"><code class="xref py py-class docutils literal notranslate"><span class="pre">SpatialReference</span></code></a>.</li>
<li>The <a class="reference internal" href="../ref/contrib/gis/gdal.html#django.contrib.gis.gdal.DataSource" title="django.contrib.gis.gdal.DataSource"><code class="xref py py-class docutils literal notranslate"><span class="pre">DataSource</span></code></a> class now supports
<a class="reference external" href="https://docs.python.org/3/library/pathlib.html#pathlib.Path" title="(在 Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pathlib.Path</span></code></a>.</li>
<li>The <a class="reference internal" href="../ref/contrib/gis/layermapping.html#django.contrib.gis.utils.LayerMapping" title="django.contrib.gis.utils.LayerMapping"><code class="xref py py-class docutils literal notranslate"><span class="pre">LayerMapping</span></code></a> class now supports
<a class="reference external" href="https://docs.python.org/3/library/pathlib.html#pathlib.Path" title="(在 Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pathlib.Path</span></code></a>.</li>
</ul>
</div>
<div class="section" id="s-django-contrib-postgres">
<span id="django-contrib-postgres"></span><h4><a class="reference internal" href="../ref/contrib/postgres/index.html#module-django.contrib.postgres" title="django.contrib.postgres: PostgreSQL-specific fields and features"><code class="xref py py-mod docutils literal notranslate"><span class="pre">django.contrib.postgres</span></code></a><a class="headerlink" href="#django-contrib-postgres" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li>The new <a class="reference internal" href="../ref/contrib/postgres/constraints.html#django.contrib.postgres.constraints.ExclusionConstraint.include" title="django.contrib.postgres.constraints.ExclusionConstraint.include"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ExclusionConstraint.include</span></code></a> attribute allows creating
covering exclusion constraints on PostgreSQL 12+.</li>
<li>The new <a class="reference internal" href="../ref/contrib/postgres/constraints.html#django.contrib.postgres.constraints.ExclusionConstraint.opclasses" title="django.contrib.postgres.constraints.ExclusionConstraint.opclasses"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ExclusionConstraint.opclasses</span></code></a> attribute allows setting
PostgreSQL operator classes.</li>
<li>The new <a class="reference internal" href="../ref/contrib/postgres/aggregates.html#django.contrib.postgres.aggregates.JSONBAgg.ordering" title="django.contrib.postgres.aggregates.JSONBAgg.ordering"><code class="xref py py-attr docutils literal notranslate"><span class="pre">JSONBAgg.ordering</span></code></a> attribute determines the ordering of the
aggregated elements.</li>
<li>The new <a class="reference internal" href="../ref/contrib/postgres/aggregates.html#django.contrib.postgres.aggregates.JSONBAgg.distinct" title="django.contrib.postgres.aggregates.JSONBAgg.distinct"><code class="xref py py-attr docutils literal notranslate"><span class="pre">JSONBAgg.distinct</span></code></a> attribute determines if aggregated values
will be distinct.</li>
<li>The <a class="reference internal" href="../ref/contrib/postgres/operations.html#django.contrib.postgres.operations.CreateExtension" title="django.contrib.postgres.operations.CreateExtension"><code class="xref py py-class docutils literal notranslate"><span class="pre">CreateExtension</span></code></a> operation
now checks that the extension already exists in the database and skips the
migration if so.</li>
<li>The new <a class="reference internal" href="../ref/contrib/postgres/operations.html#django.contrib.postgres.operations.CreateCollation" title="django.contrib.postgres.operations.CreateCollation"><code class="xref py py-class docutils literal notranslate"><span class="pre">CreateCollation</span></code></a> and
<a class="reference internal" href="../ref/contrib/postgres/operations.html#django.contrib.postgres.operations.RemoveCollation" title="django.contrib.postgres.operations.RemoveCollation"><code class="xref py py-class docutils literal notranslate"><span class="pre">RemoveCollation</span></code></a> operations
allow creating and dropping collations on PostgreSQL. See
<a class="reference internal" href="../ref/contrib/postgres/operations.html#manage-postgresql-collations"><span class="std std-ref">使用迁移来管理整理</span></a> for more details.</li>
<li>Lookups for <a class="reference internal" href="../ref/contrib/postgres/fields.html#django.contrib.postgres.fields.ArrayField" title="django.contrib.postgres.fields.ArrayField"><code class="xref py py-class docutils literal notranslate"><span class="pre">ArrayField</span></code></a> now allow
(non-nested) arrays containing expressions as right-hand sides.</li>
<li>The new <a class="reference internal" href="../ref/contrib/postgres/indexes.html#django.contrib.postgres.indexes.OpClass" title="django.contrib.postgres.indexes.OpClass"><code class="xref py py-class docutils literal notranslate"><span class="pre">OpClass()</span></code></a>
expression allows creating functional indexes on expressions with a custom
operator class. See <a class="reference internal" href="#new-functional-indexes"><span class="std std-ref">Functional indexes</span></a> for more details.</li>
</ul>
</div>
<div class="section" id="s-django-contrib-sitemaps">
<span id="django-contrib-sitemaps"></span><h4><a class="reference internal" href="../ref/contrib/sitemaps.html#module-django.contrib.sitemaps" title="django.contrib.sitemaps: A framework for generating Google sitemap XML files."><code class="xref py py-mod docutils literal notranslate"><span class="pre">django.contrib.sitemaps</span></code></a><a class="headerlink" href="#django-contrib-sitemaps" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li>The new <a class="reference internal" href="../ref/contrib/sitemaps.html#django.contrib.sitemaps.Sitemap" title="django.contrib.sitemaps.Sitemap"><code class="xref py py-class docutils literal notranslate"><span class="pre">Sitemap</span></code></a> attributes
<a class="reference internal" href="../ref/contrib/sitemaps.html#django.contrib.sitemaps.Sitemap.alternates" title="django.contrib.sitemaps.Sitemap.alternates"><code class="xref py py-attr docutils literal notranslate"><span class="pre">alternates</span></code></a>,
<a class="reference internal" href="../ref/contrib/sitemaps.html#django.contrib.sitemaps.Sitemap.languages" title="django.contrib.sitemaps.Sitemap.languages"><code class="xref py py-attr docutils literal notranslate"><span class="pre">languages</span></code></a> and
<a class="reference internal" href="../ref/contrib/sitemaps.html#django.contrib.sitemaps.Sitemap.x_default" title="django.contrib.sitemaps.Sitemap.x_default"><code class="xref py py-attr docutils literal notranslate"><span class="pre">x_default</span></code></a> allow
generating sitemap <em>alternates</em> to localized versions of your pages.</li>
</ul>
</div>
<div class="section" id="s-django-contrib-syndication">
<span id="django-contrib-syndication"></span><h4><a class="reference internal" href="../ref/contrib/syndication.html#module-django.contrib.syndication" title="django.contrib.syndication: A framework for generating syndication feeds, in RSS and Atom, quite easily."><code class="xref py py-mod docutils literal notranslate"><span class="pre">django.contrib.syndication</span></code></a><a class="headerlink" href="#django-contrib-syndication" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li>The new <code class="docutils literal notranslate"><span class="pre">item_comments</span></code> hook allows specifying a comments URL per feed
item.</li>
</ul>
</div>
<div class="section" id="s-database-backends">
<span id="database-backends"></span><h4>Database backends<a class="headerlink" href="#database-backends" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li>Third-party database backends can now skip or mark as expected failures
tests in Django's test suite using the new
<code class="docutils literal notranslate"><span class="pre">DatabaseFeatures.django_test_skips</span></code> and
<code class="docutils literal notranslate"><span class="pre">django_test_expected_failures</span></code> attributes.</li>
</ul>
</div>
<div class="section" id="s-decorators">
<span id="decorators"></span><h4>Decorators<a class="headerlink" href="#decorators" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li>The new <a class="reference internal" href="../topics/http/decorators.html#django.views.decorators.common.no_append_slash" title="django.views.decorators.common.no_append_slash"><code class="xref py py-func docutils literal notranslate"><span class="pre">no_append_slash()</span></code></a> decorator
allows individual views to be excluded from <a class="reference internal" href="../ref/settings.html#std:setting-APPEND_SLASH"><code class="xref std std-setting docutils literal notranslate"><span class="pre">APPEND_SLASH</span></code></a> URL
normalization.</li>
</ul>
</div>
<div class="section" id="s-error-reporting">
<span id="error-reporting"></span><h4>Error Reporting<a class="headerlink" href="#error-reporting" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li>Custom <a class="reference internal" href="../howto/error-reporting.html#django.views.debug.ExceptionReporter" title="django.views.debug.ExceptionReporter"><code class="xref py py-class docutils literal notranslate"><span class="pre">ExceptionReporter</span></code></a> subclasses can now
define the <a class="reference internal" href="../howto/error-reporting.html#django.views.debug.ExceptionReporter.html_template_path" title="django.views.debug.ExceptionReporter.html_template_path"><code class="xref py py-attr docutils literal notranslate"><span class="pre">html_template_path</span></code></a>
and <a class="reference internal" href="../howto/error-reporting.html#django.views.debug.ExceptionReporter.text_template_path" title="django.views.debug.ExceptionReporter.text_template_path"><code class="xref py py-attr docutils literal notranslate"><span class="pre">text_template_path</span></code></a>
properties to override the templates used to render exception reports.</li>
</ul>
</div>
<div class="section" id="s-file-uploads">
<span id="file-uploads"></span><h4>File Uploads<a class="headerlink" href="#file-uploads" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li>The new <a class="reference internal" href="../ref/files/uploads.html#django.core.files.uploadhandler.FileUploadHandler.upload_interrupted" title="django.core.files.uploadhandler.FileUploadHandler.upload_interrupted"><code class="xref py py-meth docutils literal notranslate"><span class="pre">FileUploadHandler.upload_interrupted()</span></code></a>
callback allows handling interrupted uploads.</li>
</ul>
</div>
<div class="section" id="s-forms">
<span id="forms"></span><h4>Forms<a class="headerlink" href="#forms" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li>The new <code class="docutils literal notranslate"><span class="pre">absolute_max</span></code> argument for <a class="reference internal" href="../ref/forms/formsets.html#django.forms.formsets.formset_factory" title="django.forms.formsets.formset_factory"><code class="xref py py-func docutils literal notranslate"><span class="pre">formset_factory()</span></code></a>,
<a class="reference internal" href="../ref/forms/models.html#django.forms.models.inlineformset_factory" title="django.forms.models.inlineformset_factory"><code class="xref py py-func docutils literal notranslate"><span class="pre">inlineformset_factory()</span></code></a>, and <a class="reference internal" href="../ref/forms/models.html#django.forms.models.modelformset_factory" title="django.forms.models.modelformset_factory"><code class="xref py py-func docutils literal notranslate"><span class="pre">modelformset_factory()</span></code></a> allows
customizing the maximum number of forms that can be instantiated when
supplying <code class="docutils literal notranslate"><span class="pre">POST</span></code> data. See <a class="reference internal" href="../topics/forms/formsets.html#formsets-absolute-max"><span class="std std-ref">Limiting the maximum number of instantiated forms</span></a> for more details.</li>
<li>The new <code class="docutils literal notranslate"><span class="pre">can_delete_extra</span></code> argument for <a class="reference internal" href="../ref/forms/formsets.html#django.forms.formsets.formset_factory" title="django.forms.formsets.formset_factory"><code class="xref py py-func docutils literal notranslate"><span class="pre">formset_factory()</span></code></a>,
<a class="reference internal" href="../ref/forms/models.html#django.forms.models.inlineformset_factory" title="django.forms.models.inlineformset_factory"><code class="xref py py-func docutils literal notranslate"><span class="pre">inlineformset_factory()</span></code></a>, and <a class="reference internal" href="../ref/forms/models.html#django.forms.models.modelformset_factory" title="django.forms.models.modelformset_factory"><code class="xref py py-func docutils literal notranslate"><span class="pre">modelformset_factory()</span></code></a> allows
removal of the option to delete extra forms. See
<a class="reference internal" href="../topics/forms/formsets.html#django.forms.formsets.BaseFormSet.can_delete_extra" title="django.forms.formsets.BaseFormSet.can_delete_extra"><code class="xref py py-attr docutils literal notranslate"><span class="pre">can_delete_extra</span></code></a> for more information.</li>
<li><a class="reference internal" href="../topics/forms/formsets.html#django.forms.formsets.BaseFormSet" title="django.forms.formsets.BaseFormSet"><code class="xref py py-class docutils literal notranslate"><span class="pre">BaseFormSet</span></code></a> now reports a user facing error,
rather than raising an exception, when the management form is missing or has
been tampered with. To customize this error message, pass the
<code class="docutils literal notranslate"><span class="pre">error_messages</span></code> argument with the key <code class="docutils literal notranslate"><span class="pre">'missing_management_form'</span></code> when
instantiating the formset.</li>
</ul>
</div>
<div class="section" id="s-generic-views">
<span id="generic-views"></span><h4>Generic Views<a class="headerlink" href="#generic-views" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li>The <code class="docutils literal notranslate"><span class="pre">week_format</span></code> attributes of
<a class="reference internal" href="../ref/class-based-views/mixins-date-based.html#django.views.generic.dates.WeekMixin" title="django.views.generic.dates.WeekMixin"><code class="xref py py-class docutils literal notranslate"><span class="pre">WeekMixin</span></code></a> and
<a class="reference internal" href="../ref/class-based-views/generic-date-based.html#django.views.generic.dates.WeekArchiveView" title="django.views.generic.dates.WeekArchiveView"><code class="xref py py-class docutils literal notranslate"><span class="pre">WeekArchiveView</span></code></a> now support the
<code class="docutils literal notranslate"><span class="pre">'%V'</span></code> ISO 8601 week format.</li>
</ul>
</div>
<div class="section" id="s-management-commands">
<span id="management-commands"></span><h4>Management Commands<a class="headerlink" href="#management-commands" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li><a class="reference internal" href="../ref/django-admin.html#django-admin-loaddata"><code class="xref std std-djadmin docutils literal notranslate"><span class="pre">loaddata</span></code></a> now supports fixtures stored in XZ archives (<code class="docutils literal notranslate"><span class="pre">.xz</span></code>) and
LZMA archives (<code class="docutils literal notranslate"><span class="pre">.lzma</span></code>).</li>
<li><a class="reference internal" href="../ref/django-admin.html#django-admin-dumpdata"><code class="xref std std-djadmin docutils literal notranslate"><span class="pre">dumpdata</span></code></a> now can compress data in the <code class="docutils literal notranslate"><span class="pre">bz2</span></code>, <code class="docutils literal notranslate"><span class="pre">gz</span></code>, <code class="docutils literal notranslate"><span class="pre">lzma</span></code>,
or <code class="docutils literal notranslate"><span class="pre">xz</span></code> formats.</li>
<li><a class="reference internal" href="../ref/django-admin.html#django-admin-makemigrations"><code class="xref std std-djadmin docutils literal notranslate"><span class="pre">makemigrations</span></code></a> can now be called without an active database
connection. In that case, check for a consistent migration history is
skipped.</li>
<li><a class="reference internal" href="../howto/custom-management-commands.html#django.core.management.BaseCommand.requires_system_checks" title="django.core.management.BaseCommand.requires_system_checks"><code class="xref py py-attr docutils literal notranslate"><span class="pre">BaseCommand.requires_system_checks</span></code></a> now supports specifying a list of
tags. System checks registered in the chosen tags will be checked for errors
prior to executing the command. In previous versions, either all or none
of the system checks were performed.</li>
<li>Support for colored terminal output on Windows is updated. Various modern
terminal environments are automatically detected, and the options for
enabling support in other cases are improved. See <a class="reference internal" href="../ref/django-admin.html#syntax-coloring"><span class="std std-ref">语法着色</span></a> for
more details.</li>
</ul>
</div>
<div class="section" id="s-migrations">
<span id="migrations"></span><h4>Migrations<a class="headerlink" href="#migrations" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li>The new <code class="docutils literal notranslate"><span class="pre">Operation.migration_name_fragment</span></code> property allows providing a
filename fragment that will be used to name a migration containing only that
operation.</li>
<li>Migrations now support serialization of pure and concrete path objects from
<a class="reference external" href="https://docs.python.org/3/library/pathlib.html#module-pathlib" title="(在 Python v3.9)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pathlib</span></code></a>, and <a class="reference external" href="https://docs.python.org/3/library/os.html#os.PathLike" title="(在 Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">os.PathLike</span></code></a> instances.</li>
</ul>
</div>
<div class="section" id="s-models">
<span id="models"></span><h4>Models<a class="headerlink" href="#models" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li>The new <code class="docutils literal notranslate"><span class="pre">no_key</span></code> parameter for <a class="reference internal" href="../ref/models/querysets.html#django.db.models.query.QuerySet.select_for_update" title="django.db.models.query.QuerySet.select_for_update"><code class="xref py py-meth docutils literal notranslate"><span class="pre">QuerySet.select_for_update()</span></code></a>,
supported on PostgreSQL, allows acquiring weaker locks that don't block the
creation of rows that reference locked rows through a foreign key.</li>
<li><a class="reference internal" href="../ref/models/conditional-expressions.html#django.db.models.expressions.When" title="django.db.models.expressions.When"><code class="xref py py-class docutils literal notranslate"><span class="pre">When()</span></code></a> expression now allows
using the <code class="docutils literal notranslate"><span class="pre">condition</span></code> argument with <code class="docutils literal notranslate"><span class="pre">lookups</span></code>.</li>
<li>The new <a class="reference internal" href="../ref/models/indexes.html#django.db.models.Index.include" title="django.db.models.Index.include"><code class="xref py py-attr docutils literal notranslate"><span class="pre">Index.include</span></code></a> and <a class="reference internal" href="../ref/models/constraints.html#django.db.models.UniqueConstraint.include" title="django.db.models.UniqueConstraint.include"><code class="xref py py-attr docutils literal notranslate"><span class="pre">UniqueConstraint.include</span></code></a>
attributes allow creating covering indexes and covering unique constraints on
PostgreSQL 11+.</li>
<li>The new <a class="reference internal" href="../ref/models/constraints.html#django.db.models.UniqueConstraint.opclasses" title="django.db.models.UniqueConstraint.opclasses"><code class="xref py py-attr docutils literal notranslate"><span class="pre">UniqueConstraint.opclasses</span></code></a> attribute allows setting
PostgreSQL operator classes.</li>
<li>The <a class="reference internal" href="../ref/models/querysets.html#django.db.models.query.QuerySet.update" title="django.db.models.query.QuerySet.update"><code class="xref py py-meth docutils literal notranslate"><span class="pre">QuerySet.update()</span></code></a> method now respects the <code class="docutils literal notranslate"><span class="pre">order_by()</span></code> clause on
MySQL and MariaDB.</li>
<li><a class="reference internal" href="../ref/models/querysets.html#django.db.models.FilteredRelation" title="django.db.models.FilteredRelation"><code class="xref py py-class docutils literal notranslate"><span class="pre">FilteredRelation()</span></code></a> now supports
nested relations.</li>
<li>The <code class="docutils literal notranslate"><span class="pre">of</span></code> argument of <a class="reference internal" href="../ref/models/querysets.html#django.db.models.query.QuerySet.select_for_update" title="django.db.models.query.QuerySet.select_for_update"><code class="xref py py-meth docutils literal notranslate"><span class="pre">QuerySet.select_for_update()</span></code></a> is now allowed
on MySQL 8.0.1+.</li>
<li><a class="reference internal" href="../ref/models/expressions.html#django.db.models.Value" title="django.db.models.Value"><code class="xref py py-class docutils literal notranslate"><span class="pre">Value()</span></code></a> expression now
automatically resolves its <code class="docutils literal notranslate"><span class="pre">output_field</span></code> to the appropriate
<a class="reference internal" href="../ref/models/fields.html#django.db.models.Field" title="django.db.models.Field"><code class="xref py py-class docutils literal notranslate"><span class="pre">Field</span></code></a> subclass based on the type of
its provided <code class="docutils literal notranslate"><span class="pre">value</span></code> for <a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(在 Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bytes" title="(在 Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bytes</span></code></a>,
<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(在 Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(在 Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(在 Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>,
<a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.date" title="(在 Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.date</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(在 Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.datetime</span></code></a>,
<a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.time" title="(在 Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.time</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.timedelta" title="(在 Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.timedelta</span></code></a>,
<a class="reference external" href="https://docs.python.org/3/library/decimal.html#decimal.Decimal" title="(在 Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">decimal.Decimal</span></code></a>, and <a class="reference external" href="https://docs.python.org/3/library/uuid.html#uuid.UUID" title="(在 Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">uuid.UUID</span></code></a> instances. As a
consequence, resolving an <code class="docutils literal notranslate"><span class="pre">output_field</span></code> for database functions and
combined expressions may now crash with mixed types when using <code class="docutils literal notranslate"><span class="pre">Value()</span></code>.
You will need to explicitly set the <code class="docutils literal notranslate"><span class="pre">output_field</span></code> in such cases.</li>
<li>The new <a class="reference internal" href="../ref/models/querysets.html#django.db.models.query.QuerySet.alias" title="django.db.models.query.QuerySet.alias"><code class="xref py py-meth docutils literal notranslate"><span class="pre">QuerySet.alias()</span></code></a> method allows creating reusable aliases for
expressions that don't need to be selected but are used for filtering,
ordering, or as a part of complex expressions.</li>
<li>The new <a class="reference internal" href="../ref/models/database-functions.html#django.db.models.functions.Collate" title="django.db.models.functions.Collate"><code class="xref py py-class docutils literal notranslate"><span class="pre">Collate</span></code></a> function allows
filtering and ordering by specified database collations.</li>
<li>The <code class="docutils literal notranslate"><span class="pre">field_name</span></code> argument of <a class="reference internal" href="../ref/models/querysets.html#django.db.models.query.QuerySet.in_bulk" title="django.db.models.query.QuerySet.in_bulk"><code class="xref py py-meth docutils literal notranslate"><span class="pre">QuerySet.in_bulk()</span></code></a> now accepts
distinct fields if there's only one field specified in
<a class="reference internal" href="../ref/models/querysets.html#django.db.models.query.QuerySet.distinct" title="django.db.models.query.QuerySet.distinct"><code class="xref py py-meth docutils literal notranslate"><span class="pre">QuerySet.distinct()</span></code></a>.</li>
<li>The new <code class="docutils literal notranslate"><span class="pre">tzinfo</span></code> parameter of the
<a class="reference internal" href="../ref/models/database-functions.html#django.db.models.functions.TruncDate" title="django.db.models.functions.TruncDate"><code class="xref py py-class docutils literal notranslate"><span class="pre">TruncDate</span></code></a> and
<a class="reference internal" href="../ref/models/database-functions.html#django.db.models.functions.TruncTime" title="django.db.models.functions.TruncTime"><code class="xref py py-class docutils literal notranslate"><span class="pre">TruncTime</span></code></a> database functions allows
truncating datetimes in a specific timezone.</li>
<li>The new <code class="docutils literal notranslate"><span class="pre">db_collation</span></code> argument for
<a class="reference internal" href="../ref/models/fields.html#django.db.models.CharField.db_collation" title="django.db.models.CharField.db_collation"><code class="xref py py-attr docutils literal notranslate"><span class="pre">CharField</span></code></a> and
<a class="reference internal" href="../ref/models/fields.html#django.db.models.TextField.db_collation" title="django.db.models.TextField.db_collation"><code class="xref py py-attr docutils literal notranslate"><span class="pre">TextField</span></code></a> allows setting a
database collation for the field.</li>
<li>Added the <a class="reference internal" href="../ref/models/database-functions.html#django.db.models.functions.Random" title="django.db.models.functions.Random"><code class="xref py py-class docutils literal notranslate"><span class="pre">Random</span></code></a> database function.</li>
<li><a class="reference internal" href="../ref/models/querysets.html#aggregation-functions"><span class="std std-ref">聚合函数</span></a>, <a class="reference internal" href="../ref/models/expressions.html#django.db.models.F" title="django.db.models.F"><code class="xref py py-class docutils literal notranslate"><span class="pre">F()</span></code></a>,
<a class="reference internal" href="../ref/models/expressions.html#django.db.models.OuterRef" title="django.db.models.OuterRef"><code class="xref py py-class docutils literal notranslate"><span class="pre">OuterRef()</span></code></a>, and other expressions now
allow using transforms. See <a class="reference internal" href="../topics/db/queries.html#using-transforms-in-expressions"><span class="std std-ref">Expressions can reference transforms</span></a> for
details.</li>
<li>The new <code class="docutils literal notranslate"><span class="pre">durable</span></code> argument for <a class="reference internal" href="../topics/db/transactions.html#django.db.transaction.atomic" title="django.db.transaction.atomic"><code class="xref py py-func docutils literal notranslate"><span class="pre">atomic()</span></code></a>
guarantees that changes made in the atomic block will be committed if the
block exits without errors. A nested atomic block marked as durable will
raise a <code class="docutils literal notranslate"><span class="pre">RuntimeError</span></code>.</li>
<li>Added the <a class="reference internal" href="../ref/models/database-functions.html#django.db.models.functions.JSONObject" title="django.db.models.functions.JSONObject"><code class="xref py py-class docutils literal notranslate"><span class="pre">JSONObject</span></code></a> database function.</li>
</ul>
</div>
<div class="section" id="s-pagination">
<span id="pagination"></span><h4>Pagination<a class="headerlink" href="#pagination" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li>The new <a class="reference internal" href="../ref/paginator.html#django.core.paginator.Paginator.get_elided_page_range" title="django.core.paginator.Paginator.get_elided_page_range"><code class="xref py py-meth docutils literal notranslate"><span class="pre">django.core.paginator.Paginator.get_elided_page_range()</span></code></a> method
allows generating a page range with some of the values elided. If there are a
large number of pages, this can be helpful for generating a reasonable number
of page links in a template.</li>
</ul>
</div>
<div class="section" id="s-requests-and-responses">
<span id="requests-and-responses"></span><h4>Requests and Responses<a class="headerlink" href="#requests-and-responses" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li>Response headers are now stored in <a class="reference internal" href="../ref/request-response.html#django.http.HttpResponse.headers" title="django.http.HttpResponse.headers"><code class="xref py py-attr docutils literal notranslate"><span class="pre">HttpResponse.headers</span></code></a>. This can be
used instead of the original dict-like interface of <code class="docutils literal notranslate"><span class="pre">HttpResponse</span></code> objects.
Both interfaces will continue to be supported. See
<a class="reference internal" href="../ref/request-response.html#setting-header-fields"><span class="std std-ref">设置头字段</span></a> for details.</li>
<li>The new <code class="docutils literal notranslate"><span class="pre">headers</span></code> parameter of <a class="reference internal" href="../ref/request-response.html#django.http.HttpResponse" title="django.http.HttpResponse"><code class="xref py py-class docutils literal notranslate"><span class="pre">HttpResponse</span></code></a>,
<a class="reference internal" href="../ref/template-response.html#django.template.response.SimpleTemplateResponse" title="django.template.response.SimpleTemplateResponse"><code class="xref py py-class docutils literal notranslate"><span class="pre">SimpleTemplateResponse</span></code></a>, and
<a class="reference internal" href="../ref/template-response.html#django.template.response.TemplateResponse" title="django.template.response.TemplateResponse"><code class="xref py py-class docutils literal notranslate"><span class="pre">TemplateResponse</span></code></a> allows setting response
<a class="reference internal" href="../ref/request-response.html#django.http.HttpResponse.headers" title="django.http.HttpResponse.headers"><code class="xref py py-attr docutils literal notranslate"><span class="pre">headers</span></code></a> on instantiation.</li>
</ul>
</div>
<div class="section" id="s-security">
<span id="security"></span><h4>Security<a class="headerlink" href="#security" title="永久链接至标题">¶</a></h4>
<ul>
<li><p class="first">The <a class="reference internal" href="../ref/settings.html#std:setting-SECRET_KEY"><code class="xref std std-setting docutils literal notranslate"><span class="pre">SECRET_KEY</span></code></a> setting is now checked for a valid value upon first
access, rather than when settings are first loaded. This enables running
management commands that do not rely on the <code class="docutils literal notranslate"><span class="pre">SECRET_KEY</span></code> without needing to
provide a value. As a consequence of this, calling
<a class="reference internal" href="../topics/settings.html#django.conf.settings.configure" title="django.conf.settings.configure"><code class="xref py py-func docutils literal notranslate"><span class="pre">configure()</span></code></a> without providing a valid
<code class="docutils literal notranslate"><span class="pre">SECRET_KEY</span></code>, and then going on to access <code class="docutils literal notranslate"><span class="pre">settings.SECRET_KEY</span></code> will now
raise an <a class="reference internal" href="../ref/exceptions.html#django.core.exceptions.ImproperlyConfigured" title="django.core.exceptions.ImproperlyConfigured"><code class="xref py py-exc docutils literal notranslate"><span class="pre">ImproperlyConfigured</span></code></a> exception.</p>
</li>
<li><p class="first">The new <code class="docutils literal notranslate"><span class="pre">Signer.sign_object()</span></code> and <code class="docutils literal notranslate"><span class="pre">Signer.unsign_object()</span></code> methods allow
signing complex data structures. See <a class="reference internal" href="../topics/signing.html#signing-complex-data"><span class="std std-ref">Protecting complex data structures</span></a> for more
details.</p>
<p>Also, <a class="reference internal" href="../topics/signing.html#django.core.signing.dumps" title="django.core.signing.dumps"><code class="xref py py-func docutils literal notranslate"><span class="pre">signing.dumps()</span></code></a> and
<a class="reference internal" href="../topics/signing.html#django.core.signing.loads" title="django.core.signing.loads"><code class="xref py py-func docutils literal notranslate"><span class="pre">loads()</span></code></a> become shortcuts for
<a class="reference internal" href="../topics/signing.html#django.core.signing.TimestampSigner.sign_object" title="django.core.signing.TimestampSigner.sign_object"><code class="xref py py-meth docutils literal notranslate"><span class="pre">TimestampSigner.sign_object()</span></code></a> and
<a class="reference internal" href="../topics/signing.html#django.core.signing.TimestampSigner.unsign_object" title="django.core.signing.TimestampSigner.unsign_object"><code class="xref py py-meth docutils literal notranslate"><span class="pre">unsign_object()</span></code></a>.</p>
</li>
</ul>
</div>
<div class="section" id="s-serialization">
<span id="serialization"></span><h4>Serialization<a class="headerlink" href="#serialization" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li>The new <a class="reference internal" href="../topics/serialization.html#serialization-formats-jsonl"><span class="std std-ref">JSONL</span></a> serializer allows using
the JSON Lines format with <a class="reference internal" href="../ref/django-admin.html#django-admin-dumpdata"><code class="xref std std-djadmin docutils literal notranslate"><span class="pre">dumpdata</span></code></a> and <a class="reference internal" href="../ref/django-admin.html#django-admin-loaddata"><code class="xref std std-djadmin docutils literal notranslate"><span class="pre">loaddata</span></code></a>. This
can be useful for populating large databases because data is loaded line by
line into memory, rather than being loaded all at once.</li>
</ul>
</div>
<div class="section" id="s-signals">
<span id="signals"></span><h4>Signals<a class="headerlink" href="#signals" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li><a class="reference internal" href="../topics/signals.html#django.dispatch.Signal.send_robust" title="django.dispatch.Signal.send_robust"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Signal.send_robust()</span></code></a> now logs
exceptions.</li>
</ul>
</div>
<div class="section" id="s-templates">
<span id="templates"></span><h4>Templates<a class="headerlink" href="#templates" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li><a class="reference internal" href="../ref/templates/builtins.html#std:templatefilter-floatformat"><code class="xref std std-tfilter docutils literal notranslate"><span class="pre">floatformat</span></code></a> template filter now allows using the <code class="docutils literal notranslate"><span class="pre">g</span></code> suffix to
force grouping by the <a class="reference internal" href="../ref/settings.html#std:setting-THOUSAND_SEPARATOR"><code class="xref std std-setting docutils literal notranslate"><span class="pre">THOUSAND_SEPARATOR</span></code></a> for the active locale.</li>
<li>Templates cached with <a class="reference internal" href="../ref/templates/api.html#template-loaders"><span class="std std-ref">Cached template loaders</span></a> are
now correctly reloaded in development.</li>
</ul>
</div>
<div class="section" id="s-tests">
<span id="tests"></span><h4>Tests<a class="headerlink" href="#tests" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li>Objects assigned to class attributes in <a class="reference internal" href="../topics/testing/tools.html#django.test.TestCase.setUpTestData" title="django.test.TestCase.setUpTestData"><code class="xref py py-meth docutils literal notranslate"><span class="pre">TestCase.setUpTestData()</span></code></a> are
now isolated for each test method. Such objects are now required to support
creating deep copies with <a class="reference external" href="https://docs.python.org/3/library/copy.html#copy.deepcopy" title="(在 Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">copy.deepcopy()</span></code></a>. Assigning objects which
don't support <code class="docutils literal notranslate"><span class="pre">deepcopy()</span></code> is deprecated and will be removed in Django 4.1.</li>
<li><a class="reference internal" href="../topics/testing/advanced.html#django.test.runner.DiscoverRunner" title="django.test.runner.DiscoverRunner"><code class="xref py py-class docutils literal notranslate"><span class="pre">DiscoverRunner</span></code></a> now enables
<a class="reference external" href="https://docs.python.org/3/library/faulthandler.html#module-faulthandler" title="(在 Python v3.9)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">faulthandler</span></code></a> by default. This can be disabled by using the
<a class="reference internal" href="../ref/django-admin.html#cmdoption-test-no-faulthandler"><code class="xref std std-option docutils literal notranslate"><span class="pre">test</span> <span class="pre">--no-faulthandler</span></code></a> option.</li>
<li><a class="reference internal" href="../topics/testing/advanced.html#django.test.runner.DiscoverRunner" title="django.test.runner.DiscoverRunner"><code class="xref py py-class docutils literal notranslate"><span class="pre">DiscoverRunner</span></code></a> and the
<a class="reference internal" href="../ref/django-admin.html#django-admin-test"><code class="xref std std-djadmin docutils literal notranslate"><span class="pre">test</span></code></a> management command can now track timings, including database
setup and total run time. This can be enabled by using the <a class="reference internal" href="../ref/django-admin.html#cmdoption-test-timing"><code class="xref std std-option docutils literal notranslate"><span class="pre">test</span>
<span class="pre">--timing</span></code></a> option.</li>
<li><a class="reference internal" href="../topics/testing/tools.html#django.test.Client" title="django.test.Client"><code class="xref py py-class docutils literal notranslate"><span class="pre">Client</span></code></a> now preserves the request query string when
following 307 and 308 redirects.</li>
<li>The new <a class="reference internal" href="../topics/testing/tools.html#django.test.TestCase.captureOnCommitCallbacks" title="django.test.TestCase.captureOnCommitCallbacks"><code class="xref py py-meth docutils literal notranslate"><span class="pre">TestCase.captureOnCommitCallbacks()</span></code></a> method captures callback
functions passed to <a class="reference internal" href="../topics/db/transactions.html#django.db.transaction.on_commit" title="django.db.transaction.on_commit"><code class="xref py py-func docutils literal notranslate"><span class="pre">transaction.on_commit()</span></code></a> in a list. This allows you to test such
callbacks without using the slower <a class="reference internal" href="../topics/testing/tools.html#django.test.TransactionTestCase" title="django.test.TransactionTestCase"><code class="xref py py-class docutils literal notranslate"><span class="pre">TransactionTestCase</span></code></a>.</li>
<li><a class="reference internal" href="../topics/testing/tools.html#django.test.TransactionTestCase.assertQuerysetEqual" title="django.test.TransactionTestCase.assertQuerysetEqual"><code class="xref py py-meth docutils literal notranslate"><span class="pre">TransactionTestCase.assertQuerysetEqual()</span></code></a> now supports direct
comparison against another queryset rather than being restricted to
comparison against a list of string representations of objects when using the
default value for the <code class="docutils literal notranslate"><span class="pre">transform</span></code> argument.</li>
</ul>
</div>
<div class="section" id="s-utilities">
<span id="utilities"></span><h4>Utilities<a class="headerlink" href="#utilities" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li>The new <code class="docutils literal notranslate"><span class="pre">depth</span></code> parameter of <code class="docutils literal notranslate"><span class="pre">django.utils.timesince.timesince()</span></code> and
<code class="docutils literal notranslate"><span class="pre">django.utils.timesince.timeuntil()</span></code> functions allows specifying the number
of adjacent time units to return.</li>
</ul>
</div>
<div class="section" id="s-validators">
<span id="validators"></span><h4>Validators<a class="headerlink" href="#validators" title="永久链接至标题">¶</a></h4>
<ul class="simple">
<li>Built-in validators now include the provided value in the <code class="docutils literal notranslate"><span class="pre">params</span></code> argument
of a raised <a class="reference internal" href="../ref/exceptions.html#django.core.exceptions.ValidationError" title="django.core.exceptions.ValidationError"><code class="xref py py-exc docutils literal notranslate"><span class="pre">ValidationError</span></code></a>. This allows
custom error messages to use the <code class="docutils literal notranslate"><span class="pre">%(value)s</span></code> placeholder.</li>
<li>The <a class="reference internal" href="../ref/exceptions.html#django.core.exceptions.ValidationError" title="django.core.exceptions.ValidationError"><code class="xref py py-class docutils literal notranslate"><span class="pre">ValidationError</span></code></a> equality operator now ignores <code class="docutils literal notranslate"><span class="pre">messages</span></code> and
<code class="docutils literal notranslate"><span class="pre">params</span></code> ordering.</li>
</ul>
</div>
</div>
</div>
<div class="section" id="s-backwards-incompatible-changes-in-3-2">
<span id="s-backwards-incompatible-3-2"></span><span id="backwards-incompatible-changes-in-3-2"></span><span id="backwards-incompatible-3-2"></span><h2>Backwards incompatible changes in 3.2<a class="headerlink" href="#backwards-incompatible-changes-in-3-2" title="永久链接至标题">¶</a></h2>
<div class="section" id="s-database-backend-api">
<span id="database-backend-api"></span><h3>Database backend API<a class="headerlink" href="#database-backend-api" title="永久链接至标题">¶</a></h3>
<p>This section describes changes that may be needed in third-party database
backends.</p>
<ul class="simple">
<li>The new <code class="docutils literal notranslate"><span class="pre">DatabaseFeatures.introspected_field_types</span></code> property replaces these
features:<ul>
<li><code class="docutils literal notranslate"><span class="pre">can_introspect_autofield</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">can_introspect_big_integer_field</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">can_introspect_binary_field</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">can_introspect_decimal_field</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">can_introspect_duration_field</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">can_introspect_ip_address_field</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">can_introspect_positive_integer_field</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">can_introspect_small_integer_field</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">can_introspect_time_field</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">introspected_big_auto_field_type</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">introspected_small_auto_field_type</span></code></li>
<li><code class="docutils literal notranslate"><span class="pre">introspected_boolean_field_type</span></code></li>
</ul>
</li>
<li>To enable support for covering indexes (<a class="reference internal" href="../ref/models/indexes.html#django.db.models.Index.include" title="django.db.models.Index.include"><code class="xref py py-attr docutils literal notranslate"><span class="pre">Index.include</span></code></a>) and covering
unique constraints (<a class="reference internal" href="../ref/models/constraints.html#django.db.models.UniqueConstraint.include" title="django.db.models.UniqueConstraint.include"><code class="xref py py-attr docutils literal notranslate"><span class="pre">UniqueConstraint.include</span></code></a>), set
<code class="docutils literal notranslate"><span class="pre">DatabaseFeatures.supports_covering_indexes</span></code> to <code class="docutils literal notranslate"><span class="pre">True</span></code>.</li>
<li>Third-party database backends must implement support for column database
collations on <code class="docutils literal notranslate"><span class="pre">CharField</span></code>s and <code class="docutils literal notranslate"><span class="pre">TextField</span></code>s or set
<code class="docutils literal notranslate"><span class="pre">DatabaseFeatures.supports_collation_on_charfield</span></code> and
<code class="docutils literal notranslate"><span class="pre">DatabaseFeatures.supports_collation_on_textfield</span></code> to <code class="docutils literal notranslate"><span class="pre">False</span></code>. If
non-deterministic collations are not supported, set
<code class="docutils literal notranslate"><span class="pre">supports_non_deterministic_collations</span></code> to <code class="docutils literal notranslate"><span class="pre">False</span></code>.</li>
<li><code class="docutils literal notranslate"><span class="pre">DatabaseOperations.random_function_sql()</span></code> is removed in favor of the new
<a class="reference internal" href="../ref/models/database-functions.html#django.db.models.functions.Random" title="django.db.models.functions.Random"><code class="xref py py-class docutils literal notranslate"><span class="pre">Random</span></code></a> database function.</li>
<li><code class="docutils literal notranslate"><span class="pre">DatabaseOperations.date_trunc_sql()</span></code> and
<code class="docutils literal notranslate"><span class="pre">DatabaseOperations.time_trunc_sql()</span></code> now take the optional <code class="docutils literal notranslate"><span class="pre">tzname</span></code>
argument in order to truncate in a specific timezone.</li>
<li><code class="docutils literal notranslate"><span class="pre">DatabaseClient.runshell()</span></code> now gets arguments and an optional dictionary
with environment variables to the underlying command-line client from
<code class="docutils literal notranslate"><span class="pre">DatabaseClient.settings_to_cmd_args_env()</span></code> method. Third-party database
backends must implement <code class="docutils literal notranslate"><span class="pre">DatabaseClient.settings_to_cmd_args_env()</span></code> or
override <code class="docutils literal notranslate"><span class="pre">DatabaseClient.runshell()</span></code>.</li>
<li>Third-party database backends must implement support for functional indexes
(<a class="reference internal" href="../ref/models/indexes.html#django.db.models.Index.expressions" title="django.db.models.Index.expressions"><code class="xref py py-attr docutils literal notranslate"><span class="pre">Index.expressions</span></code></a>) or set
<code class="docutils literal notranslate"><span class="pre">DatabaseFeatures.supports_expression_indexes</span></code> to <code class="docutils literal notranslate"><span class="pre">False</span></code>. If <code class="docutils literal notranslate"><span class="pre">COLLATE</span></code>
is not a part of the <code class="docutils literal notranslate"><span class="pre">CREATE</span> <span class="pre">INDEX</span></code> statement, set
<code class="docutils literal notranslate"><span class="pre">DatabaseFeatures.collate_as_index_expression</span></code> to <code class="docutils literal notranslate"><span class="pre">True</span></code>.</li>
</ul>
</div>
<div class="section" id="s-id1">
<span id="id1"></span><h3><a class="reference internal" href="../ref/contrib/admin/index.html#module-django.contrib.admin" title="django.contrib.admin: Django's admin site."><code class="xref py py-mod docutils literal notranslate"><span class="pre">django.contrib.admin</span></code></a><a class="headerlink" href="#id1" title="永久链接至标题">¶</a></h3>
<ul class="simple">
<li>Pagination links in the admin are now 1-indexed instead of 0-indexed, i.e.
the query string for the first page is <code class="docutils literal notranslate"><span class="pre">?p=1</span></code> instead of <code class="docutils literal notranslate"><span class="pre">?p=0</span></code>.</li>
<li>The new admin catch-all view will break URL patterns routed after the admin
URLs and matching the admin URL prefix. You can either adjust your URL
ordering or, if necessary, set <a class="reference internal" href="../ref/contrib/admin/index.html#django.contrib.admin.AdminSite.final_catch_all_view" title="django.contrib.admin.AdminSite.final_catch_all_view"><code class="xref py py-attr docutils literal notranslate"><span class="pre">AdminSite.final_catch_all_view</span></code></a> to <code class="docutils literal notranslate"><span class="pre">False</span></code>,
disabling the catch-all view. See <a class="reference internal" href="#whats-new-3-2"><span class="std std-ref">What's new in Django 3.2</span></a> for more details.</li>
<li>Minified JavaScript files are no longer included with the admin. If you
require these files to be minified, consider using a third party app or
external build tool. The minified vendored JavaScript files packaged with the
admin (e.g. <a class="reference internal" href="../ref/contrib/admin/index.html#contrib-admin-jquery"><span class="std std-ref">jquery.min.js</span></a>) are still included.</li>
<li><a class="reference internal" href="../ref/contrib/admin/index.html#django.contrib.admin.ModelAdmin.prepopulated_fields" title="django.contrib.admin.ModelAdmin.prepopulated_fields"><code class="xref py py-attr docutils literal notranslate"><span class="pre">ModelAdmin.prepopulated_fields</span></code></a> no longer strips English stop words,
such as <code class="docutils literal notranslate"><span class="pre">'a'</span></code> or <code class="docutils literal notranslate"><span class="pre">'an'</span></code>.</li>
</ul>
</div>
<div class="section" id="s-id2">
<span id="id2"></span><h3><a class="reference internal" href="../ref/contrib/gis/index.html#module-django.contrib.gis" title="django.contrib.gis: Geographic Information System (GIS) extensions for Django"><code class="xref py py-mod docutils literal notranslate"><span class="pre">django.contrib.gis</span></code></a><a class="headerlink" href="#id2" title="永久链接至标题">¶</a></h3>
<ul class="simple">
<li>Support for PostGIS 2.2 is removed.</li>
<li>The Oracle backend now clones polygons (and geometry collections containing
polygons) before reorienting them and saving them to the database. They are
no longer mutated in place. You might notice this if you use the polygons
after a model is saved.</li>
</ul>
</div>
<div class="section" id="s-dropped-support-for-postgresql-9-5">
<span id="dropped-support-for-postgresql-9-5"></span><h3>Dropped support for PostgreSQL 9.5<a class="headerlink" href="#dropped-support-for-postgresql-9-5" title="永久链接至标题">¶</a></h3>
<p>Upstream support for PostgreSQL 9.5 ends in February 2021. Django 3.2 supports
PostgreSQL 9.6 and higher.</p>
</div>
<div class="section" id="s-dropped-support-for-mysql-5-6">
<span id="dropped-support-for-mysql-5-6"></span><h3>Dropped support for MySQL 5.6<a class="headerlink" href="#dropped-support-for-mysql-5-6" title="永久链接至标题">¶</a></h3>
<p>The end of upstream support for MySQL 5.6 is April 2021. Django 3.2 supports
MySQL 5.7 and higher.</p>
</div>
<div class="section" id="s-miscellaneous">
<span id="miscellaneous"></span><h3>Miscellaneous<a class="headerlink" href="#miscellaneous" title="永久链接至标题">¶</a></h3>
<ul>
<li><p class="first">Django now supports non-<code class="docutils literal notranslate"><span class="pre">pytz</span></code> time zones, such as Python 3.9+'s
<a class="reference external" href="https://docs.python.org/3/library/zoneinfo.html#module-zoneinfo" title="(在 Python v3.9)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">zoneinfo</span></code></a> module and its backport.</p>
</li>
<li><p class="first">The undocumented <code class="docutils literal notranslate"><span class="pre">SpatiaLiteOperations.proj4_version()</span></code> method is renamed
to <code class="docutils literal notranslate"><span class="pre">proj_version()</span></code>.</p>
</li>
<li><p class="first"><a class="reference internal" href="../ref/utils.html#django.utils.text.slugify" title="django.utils.text.slugify"><code class="xref py py-func docutils literal notranslate"><span class="pre">slugify()</span></code></a> now removes leading and trailing dashes
and underscores.</p>
</li>
<li><p class="first">The <a class="reference internal" href="../ref/contrib/humanize.html#std:templatefilter-intcomma"><code class="xref std std-tfilter docutils literal notranslate"><span class="pre">intcomma</span></code></a> and <a class="reference internal" href="../ref/contrib/humanize.html#std:templatefilter-intword"><code class="xref std std-tfilter docutils literal notranslate"><span class="pre">intword</span></code></a> template filters no longer
depend on the <a class="reference internal" href="../ref/settings.html#std:setting-USE_L10N"><code class="xref std std-setting docutils literal notranslate"><span class="pre">USE_L10N</span></code></a> setting.</p>
</li>
<li><p class="first">Support for <code class="docutils literal notranslate"><span class="pre">argon2-cffi</span></code> &lt; 19.1.0 is removed.</p>
</li>
<li><p class="first">The cache keys no longer includes the language when internationalization is
disabled (<code class="docutils literal notranslate"><span class="pre">USE_I18N</span> <span class="pre">=</span> <span class="pre">False</span></code>) and localization is enabled
(<code class="docutils literal notranslate"><span class="pre">USE_L10N</span> <span class="pre">=</span> <span class="pre">True</span></code>). After upgrading to Django 3.2 in such configurations,
the first request to any previously cached value will be a cache miss.</p>
</li>
<li><p class="first"><code class="docutils literal notranslate"><span class="pre">ForeignKey.validate()</span></code> now uses
<a class="reference internal" href="../topics/db/managers.html#django.db.models.Model._base_manager" title="django.db.models.Model._base_manager"><code class="xref py py-attr docutils literal notranslate"><span class="pre">_base_manager</span></code></a> rather than
<a class="reference internal" href="../topics/db/managers.html#django.db.models.Model._default_manager" title="django.db.models.Model._default_manager"><code class="xref py py-attr docutils literal notranslate"><span class="pre">_default_manager</span></code></a> to check that related
instances exist.</p>
</li>
<li><p class="first">When an application defines an <a class="reference internal" href="../ref/applications.html#django.apps.AppConfig" title="django.apps.AppConfig"><code class="xref py py-class docutils literal notranslate"><span class="pre">AppConfig</span></code></a> subclass in
an <code class="docutils literal notranslate"><span class="pre">apps.py</span></code> submodule, Django now uses this configuration automatically,
even if it isn't enabled with <code class="docutils literal notranslate"><span class="pre">default_app_config</span></code>. Set <code class="docutils literal notranslate"><span class="pre">default</span> <span class="pre">=</span> <span class="pre">False</span></code>
in the <a class="reference internal" href="../ref/applications.html#django.apps.AppConfig" title="django.apps.AppConfig"><code class="xref py py-class docutils literal notranslate"><span class="pre">AppConfig</span></code></a> subclass if you need to prevent this
behavior. See <a class="reference internal" href="#whats-new-3-2"><span class="std std-ref">What's new in Django 3.2</span></a> for more details.</p>
</li>
<li><p class="first">Instantiating an abstract model now raises <code class="docutils literal notranslate"><span class="pre">TypeError</span></code>.</p>
</li>
<li><p class="first">Keyword arguments to <a class="reference internal" href="../topics/testing/advanced.html#django.test.utils.setup_databases" title="django.test.utils.setup_databases"><code class="xref py py-func docutils literal notranslate"><span class="pre">setup_databases()</span></code></a> are now
keyword-only.</p>
</li>
<li><p class="first">The undocumented <code class="docutils literal notranslate"><span class="pre">django.utils.http.limited_parse_qsl()</span></code> function is
removed. Please use <a class="reference external" href="https://docs.python.org/3/library/urllib.parse.html#urllib.parse.parse_qsl" title="(在 Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">urllib.parse.parse_qsl()</span></code></a> instead.</p>
</li>
<li><p class="first"><code class="docutils literal notranslate"><span class="pre">django.test.utils.TestContextDecorator</span></code> now uses
<a class="reference external" href="https://docs.python.org/3/library/unittest.html#unittest.TestCase.addCleanup" title="(在 Python v3.9)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">addCleanup()</span></code></a> so that cleanups registered in the
<a class="reference external" href="https://docs.python.org/3/library/unittest.html#unittest.TestCase.setUp" title="(在 Python v3.9)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">setUp()</span></code></a> method are called before
<code class="docutils literal notranslate"><span class="pre">TestContextDecorator.disable()</span></code>.</p>
</li>
<li><p class="first"><code class="docutils literal notranslate"><span class="pre">SessionMiddleware</span></code> now raises a
<a class="reference internal" href="../ref/exceptions.html#django.contrib.sessions.exceptions.SessionInterrupted" title="django.contrib.sessions.exceptions.SessionInterrupted"><code class="xref py py-exc docutils literal notranslate"><span class="pre">SessionInterrupted</span></code></a> exception
instead of <a class="reference internal" href="../ref/exceptions.html#django.core.exceptions.SuspiciousOperation" title="django.core.exceptions.SuspiciousOperation"><code class="xref py py-exc docutils literal notranslate"><span class="pre">SuspiciousOperation</span></code></a> when a session
is destroyed in a concurrent request.</p>
</li>
<li><p class="first">The <a class="reference internal" href="../ref/models/fields.html#django.db.models.Field" title="django.db.models.Field"><code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.Field</span></code></a> equality operator now correctly
distinguishes inherited field instances across models. Additionally, the
ordering of such fields is now defined.</p>
</li>
<li><p class="first">The undocumented <code class="docutils literal notranslate"><span class="pre">django.core.files.locks.lock()</span></code> function now returns
<code class="docutils literal notranslate"><span class="pre">False</span></code> if the file cannot be locked, instead of raising
<a class="reference external" href="https://docs.python.org/3/library/exceptions.html#BlockingIOError" title="(在 Python v3.9)"><code class="xref py py-exc docutils literal notranslate"><span class="pre">BlockingIOError</span></code></a>.</p>
</li>
<li><p class="first">The password reset mechanism now invalidates tokens when the user email is
changed.</p>
</li>
<li><p class="first"><a class="reference internal" href="../ref/django-admin.html#django-admin-makemessages"><code class="xref std std-djadmin docutils literal notranslate"><span class="pre">makemessages</span></code></a> command no longer processes invalid locales specified
using <a class="reference internal" href="../ref/django-admin.html#cmdoption-makemessages-locale"><code class="xref std std-option docutils literal notranslate"><span class="pre">makemessages</span> <span class="pre">--locale</span></code></a> option, when they contain hyphens
(<code class="docutils literal notranslate"><span class="pre">'-'</span></code>).</p>
</li>
<li><p class="first">The <code class="docutils literal notranslate"><span class="pre">django.contrib.auth.forms.ReadOnlyPasswordHashField</span></code> form field is now
<a class="reference internal" href="../ref/forms/fields.html#django.forms.Field.disabled" title="django.forms.Field.disabled"><code class="xref py py-attr docutils literal notranslate"><span class="pre">disabled</span></code></a> by default. Therefore
<code class="docutils literal notranslate"><span class="pre">UserChangeForm.clean_password()</span></code> is no longer required to return the
initial value.</p>
</li>
<li><p class="first">The <code class="docutils literal notranslate"><span class="pre">cache.get_many()</span></code>, <code class="docutils literal notranslate"><span class="pre">get_or_set()</span></code>, <code class="docutils literal notranslate"><span class="pre">has_key()</span></code>, <code class="docutils literal notranslate"><span class="pre">incr()</span></code>,
<code class="docutils literal notranslate"><span class="pre">decr()</span></code>, <code class="docutils literal notranslate"><span class="pre">incr_version()</span></code>, and <code class="docutils literal notranslate"><span class="pre">decr_version()</span></code> cache operations now
correctly handle <code class="docutils literal notranslate"><span class="pre">None</span></code> stored in the cache, in the same way as any other
value, instead of behaving as though the key didn't exist.</p>
<p>Due to a <code class="docutils literal notranslate"><span class="pre">python-memcached</span></code> limitation, the previous behavior is kept for
the deprecated <code class="docutils literal notranslate"><span class="pre">MemcachedCache</span></code> backend.</p>
</li>
<li><p class="first">The minimum supported version of SQLite is increased from 3.8.3 to 3.9.0.</p>
</li>
<li><p class="first"><a class="reference internal" href="../ref/contrib/messages.html#django.contrib.messages.storage.cookie.CookieStorage" title="django.contrib.messages.storage.cookie.CookieStorage"><code class="xref py py-class docutils literal notranslate"><span class="pre">CookieStorage</span></code></a> now stores
messages in the <span class="target" id="index-0"></span><a class="rfc reference external" href="https://tools.ietf.org/html/rfc6265.html"><strong>RFC 6265</strong></a> compliant format. Support for cookies that use
the old format remains until Django 4.1.</p>
</li>
<li><p class="first">The minimum supported version of <code class="docutils literal notranslate"><span class="pre">asgiref</span></code> is increased from 3.2.10 to
3.3.2.</p>
</li>
</ul>
</div>
</div>
<div class="section" id="s-features-deprecated-in-3-2">
<span id="s-deprecated-features-3-2"></span><span id="features-deprecated-in-3-2"></span><span id="deprecated-features-3-2"></span><h2>Features deprecated in 3.2<a class="headerlink" href="#features-deprecated-in-3-2" title="永久链接至标题">¶</a></h2>
<div class="section" id="s-id3">
<span id="id3"></span><h3>Miscellaneous<a class="headerlink" href="#id3" title="永久链接至标题">¶</a></h3>
<ul class="simple">
<li>Assigning objects which don't support creating deep copies with
<a class="reference external" href="https://docs.python.org/3/library/copy.html#copy.deepcopy" title="(在 Python v3.9)"><code class="xref py py-func docutils literal notranslate"><span class="pre">copy.deepcopy()</span></code></a> to class attributes in
<a class="reference internal" href="../topics/testing/tools.html#django.test.TestCase.setUpTestData" title="django.test.TestCase.setUpTestData"><code class="xref py py-meth docutils literal notranslate"><span class="pre">TestCase.setUpTestData()</span></code></a> is deprecated.</li>
<li>Using a boolean value in <a class="reference internal" href="../howto/custom-management-commands.html#django.core.management.BaseCommand.requires_system_checks" title="django.core.management.BaseCommand.requires_system_checks"><code class="xref py py-attr docutils literal notranslate"><span class="pre">BaseCommand.requires_system_checks</span></code></a> is
deprecated. Use <code class="docutils literal notranslate"><span class="pre">'__all__'</span></code> instead of <code class="docutils literal notranslate"><span class="pre">True</span></code>, and <code class="docutils literal notranslate"><span class="pre">[]</span></code> (an empty list)
instead of <code class="docutils literal notranslate"><span class="pre">False</span></code>.</li>
<li>The <code class="docutils literal notranslate"><span class="pre">whitelist</span></code> argument and <code class="docutils literal notranslate"><span class="pre">domain_whitelist</span></code> attribute of
<a class="reference internal" href="../ref/validators.html#django.core.validators.EmailValidator" title="django.core.validators.EmailValidator"><code class="xref py py-class docutils literal notranslate"><span class="pre">EmailValidator</span></code></a> are deprecated. Use
<code class="docutils literal notranslate"><span class="pre">allowlist</span></code> instead of <code class="docutils literal notranslate"><span class="pre">whitelist</span></code>, and <code class="docutils literal notranslate"><span class="pre">domain_allowlist</span></code> instead of
<code class="docutils literal notranslate"><span class="pre">domain_whitelist</span></code>. You may need to rename <code class="docutils literal notranslate"><span class="pre">whitelist</span></code> in existing
migrations.</li>
<li>The <code class="docutils literal notranslate"><span class="pre">default_app_config</span></code> application configuration variable is deprecated,
due to the now automatic <code class="docutils literal notranslate"><span class="pre">AppConfig</span></code> discovery. See <a class="reference internal" href="#whats-new-3-2"><span class="std std-ref">What's new in Django 3.2</span></a>
for more details.</li>
<li>Automatically calling <code class="docutils literal notranslate"><span class="pre">repr()</span></code> on a queryset in
<code class="docutils literal notranslate"><span class="pre">TransactionTestCase.assertQuerysetEqual()</span></code>, when compared to string
values, is deprecated. If you need the previous behavior, explicitly set
<code class="docutils literal notranslate"><span class="pre">transform</span></code> to <code class="docutils literal notranslate"><span class="pre">repr</span></code>.</li>
<li>The <code class="docutils literal notranslate"><span class="pre">django.core.cache.backends.memcached.MemcachedCache</span></code> backend is
deprecated as <code class="docutils literal notranslate"><span class="pre">python-memcached</span></code> has some problems and seems to be
unmaintained. Use <code class="docutils literal notranslate"><span class="pre">django.core.cache.backends.memcached.PyMemcacheCache</span></code>
or <code class="docutils literal notranslate"><span class="pre">django.core.cache.backends.memcached.PyLibMCCache</span></code> instead.</li>
<li>The format of messages used by
<code class="docutils literal notranslate"><span class="pre">django.contrib.messages.storage.cookie.CookieStorage</span></code> is different from
the format generated by older versions of Django. Support for the old format
remains until Django 4.1.</li>
</ul>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      
        
          <div class="yui-b" id="sidebar">
            
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Django 3.2 release notes</a><ul>
<li><a class="reference internal" href="#python-compatibility">Python compatibility</a></li>
<li><a class="reference internal" href="#what-s-new-in-django-3-2">What's new in Django 3.2</a><ul>
<li><a class="reference internal" href="#automatic-appconfig-discovery">Automatic <code class="docutils literal notranslate"><span class="pre">AppConfig</span></code> discovery</a></li>
<li><a class="reference internal" href="#customizing-type-of-auto-created-primary-keys">Customizing type of auto-created primary keys</a></li>
<li><a class="reference internal" href="#functional-indexes">Functional indexes</a></li>
<li><a class="reference internal" href="#pymemcache-support"><code class="docutils literal notranslate"><span class="pre">pymemcache</span></code> support</a></li>
<li><a class="reference internal" href="#new-decorators-for-the-admin-site">New decorators for the admin site</a></li>
<li><a class="reference internal" href="#minor-features">Minor features</a><ul>
<li><a class="reference internal" href="#django-contrib-admin"><code class="docutils literal notranslate"><span class="pre">django.contrib.admin</span></code></a></li>
<li><a class="reference internal" href="#django-contrib-auth"><code class="docutils literal notranslate"><span class="pre">django.contrib.auth</span></code></a></li>
<li><a class="reference internal" href="#django-contrib-contenttypes"><code class="docutils literal notranslate"><span class="pre">django.contrib.contenttypes</span></code></a></li>
<li><a class="reference internal" href="#django-contrib-gis"><code class="docutils literal notranslate"><span class="pre">django.contrib.gis</span></code></a></li>
<li><a class="reference internal" href="#django-contrib-postgres"><code class="docutils literal notranslate"><span class="pre">django.contrib.postgres</span></code></a></li>
<li><a class="reference internal" href="#django-contrib-sitemaps"><code class="docutils literal notranslate"><span class="pre">django.contrib.sitemaps</span></code></a></li>
<li><a class="reference internal" href="#django-contrib-syndication"><code class="docutils literal notranslate"><span class="pre">django.contrib.syndication</span></code></a></li>
<li><a class="reference internal" href="#database-backends">Database backends</a></li>
<li><a class="reference internal" href="#decorators">Decorators</a></li>
<li><a class="reference internal" href="#error-reporting">Error Reporting</a></li>
<li><a class="reference internal" href="#file-uploads">File Uploads</a></li>
<li><a class="reference internal" href="#forms">Forms</a></li>
<li><a class="reference internal" href="#generic-views">Generic Views</a></li>
<li><a class="reference internal" href="#management-commands">Management Commands</a></li>
<li><a class="reference internal" href="#migrations">Migrations</a></li>
<li><a class="reference internal" href="#models">Models</a></li>
<li><a class="reference internal" href="#pagination">Pagination</a></li>
<li><a class="reference internal" href="#requests-and-responses">Requests and Responses</a></li>
<li><a class="reference internal" href="#security">Security</a></li>
<li><a class="reference internal" href="#serialization">Serialization</a></li>
<li><a class="reference internal" href="#signals">Signals</a></li>
<li><a class="reference internal" href="#templates">Templates</a></li>
<li><a class="reference internal" href="#tests">Tests</a></li>
<li><a class="reference internal" href="#utilities">Utilities</a></li>
<li><a class="reference internal" href="#validators">Validators</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#backwards-incompatible-changes-in-3-2">Backwards incompatible changes in 3.2</a><ul>
<li><a class="reference internal" href="#database-backend-api">Database backend API</a></li>
<li><a class="reference internal" href="#id1"><code class="docutils literal notranslate"><span class="pre">django.contrib.admin</span></code></a></li>
<li><a class="reference internal" href="#id2"><code class="docutils literal notranslate"><span class="pre">django.contrib.gis</span></code></a></li>
<li><a class="reference internal" href="#dropped-support-for-postgresql-9-5">Dropped support for PostgreSQL 9.5</a></li>
<li><a class="reference internal" href="#dropped-support-for-mysql-5-6">Dropped support for MySQL 5.6</a></li>
<li><a class="reference internal" href="#miscellaneous">Miscellaneous</a></li>
</ul>
</li>
<li><a class="reference internal" href="#features-deprecated-in-3-2">Features deprecated in 3.2</a><ul>
<li><a class="reference internal" href="#id3">Miscellaneous</a></li>
</ul>
</li>
</ul>
</li>
</ul>

  <h4>上一个主题</h4>
  <p class="topless"><a href="3.2.1.html"
                        title="上一章">Django 3.2.1 release notes</a></p>
  <h4>下一个主题</h4>
  <p class="topless"><a href="3.1.13.html"
                        title="下一章">Django 3.1.13 release notes</a></p>
  <div role="note" aria-label="source link">
    <h3>本页</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/releases/3.2.txt"
            rel="nofollow">显示源代码</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>快速搜索</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="转向" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
              <h3>Last update:</h3>
              <p class="topless">7月 23, 2021</p>
          </div>
        
      
    </div>

    <div id="ft">
      <div class="nav">
    &laquo; <a href="3.2.1.html" title="Django 3.2.1 release notes">previous</a>
     |
    <a href="index.html" title="Release notes" accesskey="U">up</a>
   |
    <a href="3.1.13.html" title="Django 3.1.13 release notes">next</a> &raquo;</div>
    </div>
  </div>

      <div class="clearer"></div>
    </div>
  </body>
</html>